import tools from "@/common/tools.js";
import {
	post
} from '@/common/axios.js';
import {
	addFeedback //意见反馈
} from '@/common/path.js'

export default {
	//用户照片操纵
	namespaced: true,
	state: {
		userInfo: uni.getStorageSync('userInfo'),
		photoList:[] //相册列表
	},
	getters: {

	},
	mutations: {
		SET_LIST(state, data) { //相册
			state.photoList = data
		},
	},
	actions: {
		//相册
		addFeedback({
			dispatch,
			commit,
			state
		}, args={}) {
			post(addFeedback, args).then(res => {
				if (res.code == 0) {
					tools.showToast2(res.msg)
					setTimeout(r=>{
						tools.back()
					},1000)
				} else {
					tools.showToast(res.msg)
				}
			})
		}


	},
}
